// 获取开发配置
export interface Env {
  api_url: string; // api 接口地址
  upload_url: string; // 文件上传接口地址
  authorization?: string; // hader authorization
  company_id: number;
}
import { localEnv } from "../env/local";
import { trialEnv } from "../env/trial";
import { proEnv } from "../env/pro";
const env = (): Env => {
  const env = wx.getAccountInfoSync();
  const envVersion = env.miniProgram.envVersion;
  switch (envVersion) {
    case "develop":
      // 开发
      return localEnv;
    case "trial":
      // 体验
      return trialEnv;
    case "release":
      // 线上
      return proEnv;
  }
};
export default env();
